<div class="blazorise-codeblock">
<div class="html"><pre>
<span class="htmlTagDelimiter">&lt;</span><span class="htmlElementName">Pagination</span><span class="htmlTagDelimiter">&gt;</span>
    <span class="htmlTagDelimiter">&lt;</span><span class="htmlElementName">PaginationItem</span> <span class="htmlAttributeName">Disabled</span><span class="htmlOperator">=</span><span class="quot">&quot;</span><span class="htmlAttributeValue"><span class="atSign">&#64;</span>isActive.First()</span><span class="quot">&quot;</span> <span class="htmlAttributeName"><span class="atSign">&#64;</span>onclick</span><span class="htmlOperator">=</span><span class="quot">&quot;</span><span class="htmlAttributeValue">Previous</span><span class="quot">&quot;</span><span class="htmlTagDelimiter">&gt;</span>
        <span class="htmlTagDelimiter">&lt;</span><span class="htmlElementName">PaginationLink</span><span class="htmlTagDelimiter">&gt;</span>
            <span class="htmlTagDelimiter">&lt;</span><span class="htmlElementName">span</span> <span class="htmlAttributeName">aria-hidden</span><span class="htmlOperator">=</span><span class="quot">&quot;</span><span class="keyword">true</span><span class="quot">&quot;</span><span class="htmlTagDelimiter">&gt;</span>&#171;<span class="htmlTagDelimiter">&lt;/</span><span class="htmlElementName">span</span><span class="htmlTagDelimiter">&gt;</span>
        <span class="htmlTagDelimiter">&lt;/</span><span class="htmlElementName">PaginationLink</span><span class="htmlTagDelimiter">&gt;</span>
    <span class="htmlTagDelimiter">&lt;/</span><span class="htmlElementName">PaginationItem</span><span class="htmlTagDelimiter">&gt;</span>
    <span class="htmlTagDelimiter">&lt;</span><span class="htmlElementName">PaginationItem</span> <span class="htmlAttributeName">Active</span><span class="htmlOperator">=</span><span class="quot">&quot;</span><span class="htmlAttributeValue"><span class="atSign">&#64;</span>isActive[0]</span><span class="quot">&quot;</span><span class="htmlTagDelimiter">&gt;</span>
        <span class="htmlTagDelimiter">&lt;</span><span class="htmlElementName">PaginationLink</span> <span class="htmlAttributeName">Page</span><span class="htmlOperator">=</span><span class="quot">&quot;</span><span class="htmlAttributeValue">1</span><span class="quot">&quot;</span> <span class="htmlAttributeName">Clicked</span><span class="htmlOperator">=</span><span class="quot">&quot;</span><span class="htmlAttributeValue">SetActive</span><span class="quot">&quot;</span><span class="htmlTagDelimiter">&gt;</span>
            1
        <span class="htmlTagDelimiter">&lt;/</span><span class="htmlElementName">PaginationLink</span><span class="htmlTagDelimiter">&gt;</span>
    <span class="htmlTagDelimiter">&lt;/</span><span class="htmlElementName">PaginationItem</span><span class="htmlTagDelimiter">&gt;</span>
    <span class="htmlTagDelimiter">&lt;</span><span class="htmlElementName">PaginationItem</span> <span class="htmlAttributeName">Active</span><span class="htmlOperator">=</span><span class="quot">&quot;</span><span class="htmlAttributeValue"><span class="atSign">&#64;</span>isActive[1]</span><span class="quot">&quot;</span><span class="htmlTagDelimiter">&gt;</span>
        <span class="htmlTagDelimiter">&lt;</span><span class="htmlElementName">PaginationLink</span> <span class="htmlAttributeName">Page</span><span class="htmlOperator">=</span><span class="quot">&quot;</span><span class="htmlAttributeValue">2</span><span class="quot">&quot;</span> <span class="htmlAttributeName">Clicked</span><span class="htmlOperator">=</span><span class="quot">&quot;</span><span class="htmlAttributeValue">SetActive</span><span class="quot">&quot;</span><span class="htmlTagDelimiter">&gt;</span>
            2
        <span class="htmlTagDelimiter">&lt;/</span><span class="htmlElementName">PaginationLink</span><span class="htmlTagDelimiter">&gt;</span>
    <span class="htmlTagDelimiter">&lt;/</span><span class="htmlElementName">PaginationItem</span><span class="htmlTagDelimiter">&gt;</span>
    <span class="htmlTagDelimiter">&lt;</span><span class="htmlElementName">PaginationItem</span> <span class="htmlAttributeName">Active</span><span class="htmlOperator">=</span><span class="quot">&quot;</span><span class="htmlAttributeValue"><span class="atSign">&#64;</span>isActive[2]</span><span class="quot">&quot;</span><span class="htmlTagDelimiter">&gt;</span>
        <span class="htmlTagDelimiter">&lt;</span><span class="htmlElementName">PaginationLink</span> <span class="htmlAttributeName">Page</span><span class="htmlOperator">=</span><span class="quot">&quot;</span><span class="htmlAttributeValue">3</span><span class="quot">&quot;</span> <span class="htmlAttributeName">Clicked</span><span class="htmlOperator">=</span><span class="quot">&quot;</span><span class="htmlAttributeValue">SetActive</span><span class="quot">&quot;</span><span class="htmlTagDelimiter">&gt;</span>
            3
        <span class="htmlTagDelimiter">&lt;/</span><span class="htmlElementName">PaginationLink</span><span class="htmlTagDelimiter">&gt;</span>
    <span class="htmlTagDelimiter">&lt;/</span><span class="htmlElementName">PaginationItem</span><span class="htmlTagDelimiter">&gt;</span>
    <span class="htmlTagDelimiter">&lt;</span><span class="htmlElementName">PaginationItem</span> <span class="htmlAttributeName">Disabled</span><span class="htmlOperator">=</span><span class="quot">&quot;</span><span class="htmlAttributeValue"><span class="atSign">&#64;</span>isActive.Last()</span><span class="quot">&quot;</span> <span class="htmlAttributeName"><span class="atSign">&#64;</span>onclick</span><span class="htmlOperator">=</span><span class="quot">&quot;</span><span class="htmlAttributeValue">Next</span><span class="quot">&quot;</span><span class="htmlTagDelimiter">&gt;</span>
        <span class="htmlTagDelimiter">&lt;</span><span class="htmlElementName">PaginationLink</span><span class="htmlTagDelimiter">&gt;</span>
            <span class="htmlTagDelimiter">&lt;</span><span class="htmlElementName">span</span> <span class="htmlAttributeName">aria-hidden</span><span class="htmlOperator">=</span><span class="quot">&quot;</span><span class="keyword">true</span><span class="quot">&quot;</span><span class="htmlTagDelimiter">&gt;</span>&#187;<span class="htmlTagDelimiter">&lt;/</span><span class="htmlElementName">span</span><span class="htmlTagDelimiter">&gt;</span>
        <span class="htmlTagDelimiter">&lt;/</span><span class="htmlElementName">PaginationLink</span><span class="htmlTagDelimiter">&gt;</span>
    <span class="htmlTagDelimiter">&lt;/</span><span class="htmlElementName">PaginationItem</span><span class="htmlTagDelimiter">&gt;</span>
<span class="htmlTagDelimiter">&lt;/</span><span class="htmlElementName">Pagination</span><span class="htmlTagDelimiter">&gt;</span>
</pre></div>
<div class="csharp"><pre>
<span class="atSign">&#64;</span>code
{
    <span class="keyword">private</span> <span class="keyword">bool</span>[] isActive = { <span class="keyword">false</span>, <span class="keyword">true</span>, <span class="keyword">false</span> };

    <span class="keyword">private</span> <span class="keyword">void</span> Previous()
    {
        <span class="keyword">if</span> (isActive[<span class="number">0</span>])
            <span class="keyword">return</span>;

        <span class="keyword">if</span> (isActive[<span class="number">1</span>])
        {
            SetActive(<span class="string">&quot;1&quot;</span>);
            <span class="keyword">return</span>;
        }

        <span class="keyword">if</span> (isActive[<span class="number">2</span>])
        {
            SetActive(<span class="string">&quot;2&quot;</span>);
            <span class="keyword">return</span>;
        }
    }

    <span class="keyword">private</span> <span class="keyword">void</span> Next()
    {
        <span class="keyword">if</span> (isActive[<span class="number">0</span>])
        {
            SetActive(<span class="string">&quot;2&quot;</span>);
            <span class="keyword">return</span>;
        }

        <span class="keyword">if</span> (isActive[<span class="number">1</span>])
        {
            SetActive(<span class="string">&quot;3&quot;</span>);
            <span class="keyword">return</span>;
        }

        <span class="keyword">if</span> (isActive[<span class="number">2</span>])
        {
            <span class="keyword">return</span>;
        }
    }

    <span class="keyword">private</span> <span class="keyword">void</span> SetActive(<span class="keyword">string</span> idx)
    {
        <span class="keyword">switch</span> (idx)
        {
            <span class="keyword">case</span> <span class="string">&quot;1&quot;</span>:
                isActive[<span class="number">0</span>] = <span class="keyword">true</span>;
                isActive[<span class="number">1</span>] = <span class="keyword">false</span>;
                isActive[<span class="number">2</span>] = <span class="keyword">false</span>;
                <span class="keyword">break</span>;
            <span class="keyword">case</span> <span class="string">&quot;2&quot;</span>:
                isActive[<span class="number">0</span>] = <span class="keyword">false</span>;
                isActive[<span class="number">1</span>] = <span class="keyword">true</span>;
                isActive[<span class="number">2</span>] = <span class="keyword">false</span>;
                <span class="keyword">break</span>;
            <span class="keyword">case</span> <span class="string">&quot;3&quot;</span>:
                isActive[<span class="number">0</span>] = <span class="keyword">false</span>;
                isActive[<span class="number">1</span>] = <span class="keyword">false</span>;
                isActive[<span class="number">2</span>] = <span class="keyword">true</span>;
                <span class="keyword">break</span>;
            <span class="keyword">default</span>:
                <span class="keyword">break</span>;
        }

    }
}
</pre></div>
</div>
